﻿/*********************************************************************
 *
 *                             NOTICE
 *               COPYRIGHT (c) 2012 Panoscopix Software, Inc.
 *                UNPUBLISHED - ALL RIGHTS RESERVED
 * 
 *      This program is confidential, proprietary, and a trade
 *   secret of Panoscopix Software, Inc. The receipt or possession of
 *     this program does not convey any rights to reproduce or
 *      disclose its contents, or to manufacture, use, or sell
 *       anything that it may describe, in whole or in part, 
 *   without the specific written consent of Panoscopix Software, Inc.
 *
 * Interface for the Factory Pattern (for Command).
 * 
 *******************************************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FileSystem
{
    interface ICommandFactory
    {
        /// <summary>
        /// List of type names this Factory can create().
        /// </summary>
        /// <returns>Type List</returns>
        ICollection<String> getNames();

        /// <summary>
        /// Return true if name is recognized by this Factory.
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        Boolean hasName(String name);

        /// <summary>
        /// Creates a Command of specified name, with default initialization.
        /// </summary>
        /// <param name="name">Type of Command to create.  Name must be known by Factory (in getNames()).</param>
        /// <returns>Created Command.</returns>
        ICommand create(String name);

        /// <summary>
        /// Creates a Command of specified name, with specified initialization (encoded as String).
        /// </summary>
        /// <param name="name">Type of Command to create.  Name must be known by Factory (in getNames()).</param>
        /// <param name="initializer">Initialization for the created Command.</param>
        /// <returns>Created Command.</returns>
        ICommand create(String name, String initializer);
    }
}
